home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 16040 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  811 b 

  1. Path: ix.netcom.com!news
  2. From: jhewett@ix.netcom.com (Jerry Hewett)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: How do you reset a file?
  5. Date: Mon, 08 Apr 96 17:01:52 GMT
  6. Organization: Netcom
  7. Message-ID: <N.040896.100152.46@ix.netcom.com>
  8. References: <3162b143.399039@news.airmail.net>
  9. NNTP-Posting-Host: tem-ca1-01.ix.netcom.com
  10. X-NETCOM-Date: Mon Apr 08 12:02:22 PM CDT 1996
  11. X-Newsreader: Quarterdeck Message Center [2.00]
  12.  
  13. > This might be a stupid question, but I couldn't find the answer in
  14. > either of the C++ books I have.  How do you reset an fstream object
  15. > back to the beginning of the file? 
  16.  
  17. <stream handle>.seekg (0L,ios::beg)?
  18.  
  19. (The reason for the question mark is that I'm new to C++, so I might have 
  20. munged the syntax)
  21.  
  22. Check out "seekg" and "seekp" in your documentation, in any case.
  23.  
  24. Jerry H.
  25.  
  26.  
  27.  
  28.